﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        //判断当前对象是否为某个实例
        let d = new Date();
        let arr = new Array();
        console.log(arr instanceof Array);
        console.log(d instanceof Date);
        console.log(arr instanceof Date);

        //判断是否为数组
        console.log(Array.isArray(arr));
        console.log(Array.isArray(d));
    </script>
</body>
</html>